package com.xiaomi.shwx.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.xiaomi.shwx.common.cache.ShwxCache;
import com.xiaomi.shwx.entity.pojo.Material;
import com.xiaomi.shwx.service.MaterialService;
import com.xiaomi.shwx.mapper.MaterialMapper;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * <p>
 * 物料 服务实现类
 * </p>
 *
 * @author Lei
 * @since 2024-05-15
 */
@Service
public class MaterialServiceImpl extends ServiceImpl<MaterialMapper, Material> implements MaterialService {

    @Resource
    private MaterialMapper materialMapper;
    @Override
    @ShwxCache(prefix = "allMaterial:")
    public List<Material> getAllMaterial() {
        return materialMapper.selectList(null);
    }
}
